﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;

namespace Elegant.Telas.Controles
{
    class LogImageManager
    {

        private LogImagem logImage;
        private FileManager fm;

        public LogImageManager()
        {
           
            this.logImage = new LogImagem(Thread.CurrentThread.CurrentUICulture.ToString());
           
        }

        public void createAndOpenLogFile(string filePath){
            
            this.fm = new FileManager();
            fm.createAndOpenWriteFile(filePath);
        }

       
        public string putStartProcessLog(string imageName)
        {
            string message = logImage.getStartProcessingLog(imageName);
            this.fm.writeFile(message);
            return message;
        }

        public string putTransferedImageLog(string imageName)
        {
            string message = logImage.getTranferedImageLog(imageName);
            this.fm.writeFile(message);
            return message;
        }

        public string putNotTransferedImageLog(string imageName)
        {
            string message = logImage.getNotTransferedImageLog(imageName);
            this.fm.writeFile(message);
            return message;
        }

        public string putFinalProcessImageLog(string imageName)
        {
            string message = logImage.getFinalProcessLog(imageName);
            this.fm.writeFile(message);
            return message;
        }

        public void endLog()
        {
            this.fm.closeWriteFile();
        }
    }
}
